package com.mt.sdk.ble.model;

public class PublicBeaconParams {
	private String connectMac = null;
	private String connectPwd = null;
	private int sendPower = 0;
	private int sendHz = -1;
	private String newpwd = null;
	private String version = null;
	private Character deverloptype = 'Z';

	public String getConnectMac() {
		return connectMac;
	}

	public void setConnectMac(String connectMac) {
		if (connectMac == null) {
			System.out.println("connectMac == null");
			isParamsOK = false;
			return;
		} else {
			isParamsOK = true;
		}
		this.connectMac = connectMac;
	}

	public String getConnectPwd() {
		return connectPwd;
	}

	public void setConnectPwd(String connectPwd) {
		if ((connectPwd != null) && ((connectPwd.length() != 6) && (connectPwd.length() != 0))) {
			System.out.println("(connectPwd != null) && ((connectPwd.length() != 6) && (connectPwd.length() != 0))");
			isParamsOK = false;
			return;
		} else {
			isParamsOK = true;
		}
		this.connectPwd = connectPwd;
	}

	public int getSendHz() {
		return sendHz;
	}

	public void setSendHz(int sendHz) {
		if ((sendHz < 100) || (sendHz > 1200)) {
			System.out.println("(sendHz < 100) || (sendHz > 1200)");
			isParamsOK = false;
			return;
		} else {
			isParamsOK = true;
		}
		this.sendHz = sendHz;
	}

	public int getSendPower() {
		return sendPower;
	}

	public void setSendPower(int sendPower) {
		if ((sendPower < 0) || (sendPower > 3)) {
			isParamsOK = false;
			return;
		} else {
			isParamsOK = true;
		}
		this.sendPower = sendPower;
	}

	public String getNewpwd() {
		return newpwd;
	}

	public void setNewpwd(String newpwd) {
		if (newpwd == null) {
			System.out.println("(newpwd == null)");
			isParamsOK = false;
			return;
		} else {
			isParamsOK = true;
		}
		this.newpwd = newpwd;
	}

	public String getVersion() {
		return version;
	}

	public void setVersion(String version) {
		if (version == null) {
			isParamsOK = false;
			return;
		} else {
			isParamsOK = true;
		}
		this.version = version;
	}

	public Character getDeverloptype() {
		return deverloptype;
	}

	public void setDeverloptype(Character deverloptype) {
		this.deverloptype = deverloptype;
	}

	private boolean isParamsOK = true;

	public boolean isParamsOK() {
		return isParamsOK;
	}

}
